//
//  SZMineMainHeaderVew.m
//  KaiJing
//
//  Created by lanou on 16/1/11.
//  Copyright © 2016年 HuangZuCui. All rights reserved.
//

#import "SZMineMainHeaderVew.h"

// 按钮高度
#define kButtonHeight 50
@implementation SZMineMainHeaderVew

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self addAllViews];
    }
    return self;
}

- (void)addAllViews {
    // 添加想看按钮
    _wantLookBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _wantLookBtn.frame = CGRectMake(0, 0, kScreenWidth / 2 - 1, kButtonHeight);
    [_wantLookBtn setTitle:@"想看" forState:UIControlStateNormal];
    [_wantLookBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_wantLookBtn setImage:[UIImage imageNamed:@"mine_selected"] forState:UIControlStateNormal];
    _wantLookBtn.imageView.contentMode = UIViewContentModeCenter;
    _wantLookBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 20);
    [self addSubview:_wantLookBtn];
    
    // 添加看过按钮
    _lookedBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _lookedBtn.frame = CGRectMake(kScreenWidth / 2 + 1, 0, kScreenWidth / 2 - 1, kButtonHeight);
    [_lookedBtn setTitle:@"看过" forState:UIControlStateNormal];
    [_lookedBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [_lookedBtn setImage:[UIImage imageNamed:@"mine_selected"] forState:UIControlStateNormal];
    _lookedBtn.imageView.contentMode = UIViewContentModeCenter;
    _lookedBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 20);
    [self addSubview:_lookedBtn];
}

@end
